home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
rfm100.zip
/
RFM.DOC
< prev
next >
Wrap
Text File
|
1990-09-02
|
21KB
|
466 lines
RBBS-PC Automatic File Area Maintenance (RFM)
Version 1.0
Copyright 1990 by Warren Muldrow
The Software Designer
(912)-432-2440
RBBS-Net 8:928/1
Fido-Net 1:3617/1
Introduction
RFM takes advantage of the Fast File Search (FFS) capability of
RBBS-PC version 17.3 to record the date that a caller last referenced
each file on your BBS. This allows unused files to be moved to archive
areas to free up space on your disk drives. Along the way, it provides
a variety of housekeeping chores to automate the maintenance of your
file areas and directories. (RBBS-PC is copyrighted by D. Thomas Mack.)
RFM provides these services:
- Rebuilds the file and location indexes for the RBBS-PC FFS.
- Automatically moves files from Upload areas to Download areas.
- Automatically moves files from Download areas to Archive areas.
- Identifies duplicate file names.
- Rebuilds either alphabetic or date ordered FMS directories.
- Resizes the description length in FMS directories.
- Removes duplicate FMS directory entries.
- Flags or removes missing files from FMS directories.
- Optionally adjusts dates for FMS directory entries.
- Optionally adjusts file sizes for FMS directory entries.
Overview
RFM includes a modification to RBBSSUB4.BAS that adds a 3 character
field to the FIDX file. Each time a user views, downloads, or attempts
to upload a file on your system, RFM places the current date in this
field. That allows RFM to detect files on your system that are not
being used. If disk space is a concern, RFM can automaticly move old
and dusty files into a separate directory for you to copy to your
archives at your leisure.
RFM reads a control file that is compatible with the MAKEFIDX.DEF
file that you are probably already using. You may wish to edit your
existing file to take advantage of some added capabilities that RFM
provides. A detailed description of the available parameters follows
later in this document.
RFM will scan the directories and paths you define in the control
file to build an alphabetical list of files available for download.
If the FMS directory is to be verified, it is also sorted into
alphabetic sequence. The new file list is then compared with the old
file list (and optionally with the sorted FMS directory).
1
RBBS-PC Automatic File Area Maintenance (RFM)
During this comparison, RFM moves files that have been present in
the upload area for the specified number of days to the download area.
Files in the download area that have not been referenced by a caller
for the specified number of days are moved to an archive area. If the
directory into which files are moved is included in the paths to be
searched, then the file will be kept in the new FIDX, and the FMS
directory entry will remain unchanged. Otherwise, the file is dropped
from the FIDX, and the FMS directory entry can optionally be kept,
dropped, or tagged as "archived." Files found in the upload or download
areas that are missing from the FMS directory are automatically added.
Files listed in the FMS directory that are not found on disk may
optionally be kept, dropped, or tagged as "missing." RFM reports
duplicate files on your disk and deletes duplicate files listed in the
FMS directory. (Here, only the newest FMS directory entry will be
kept.)
After the comparison is completed, the revised FMS directory is
created. If your FMS directory is in date sequence, you may optionally
create a duplicate directory in alphabetic sequence to help build a
downloadable text directory for your callers. A companion program
called MAKEDIR is ideal for creating downloadable file listings from
alphabetic FMS directories.
QSORT must be available either in the current directory or in a
directory listed in the DOS "PATH" statement in order for RFM to
execute.
The Configuration File
The default name for the configuration file is RFM.DEF. RFM will
look for this file in the current directory. A different file name or
directory can be specified on the command line. Any configuration file
parameters can be overriden by providing a different value for that
parameter on the command line.
Comments can be included in the configuration file. Any line
starting with an asterisk (*) is treated as a comment. Any text
following either a semicolon (;) or percent symbol (%) is treated as a
comment. Blank lines are also ignored.
Parameters on the command line or in the configuration file may
optionally begin with either a slash (/) or a hyphen (-), but neither is
required. All values may be given in either upper or lower case. The
parameters and their values may be separated by any combination of
spaces, tabs or equals signs (=). For example, the following three
lines are all equivalent:
/LocationFile=LIDX.DEF
-locationfile LIDX.DEF
LOCATIONFILE lidx.def
2
RBBS-PC Automatic File Area Maintenance (RFM)
Getting Started
The easiest way to start using RFM is to set up the RFM.DEF file
with the least parameters needed for it to build the files needed by
RBBS-PC's Fast File Search. If you run RFM from the directory in which
your FIDX and LIDX files are kept, you need only include the UPLOAD
parameter for RBBS-PC's upload directory and one FILESPEC parameter for
each of your download directories. If you wish to keep RFM in a
different directory, then you'll also need to include the NAMEFILE and
LOCATIONFILE parameters. If you have a large RAM drive, you probably
will also want to include the WORKPATH parameter to get the fastest
possible execution.
Run RFM with this smallest configuration. The first time you run
RFM you should redirect the console output to a file that you can
review later. Using this configuration, the only messages that will
be produced in this file will be warnings of duplicate files on your
directories. The command line should look like this:
RFM >RFM.Log
Now that you have a new FIDX, you need to install the modified
copy of RBBS-PC.EXE that includes the patch provided for RBBSSUB4. If
you have not already deleted your download areas from CONFIG parameter
208, you should do this now. RBBS-PC will search all directories
listed in the download portion of parameter 208 before looking in the
FIDX file. If the dates are to be maintained in the FIDX, then RBBS-PC
must use the FIDX to find the file. If you want all uploads to be
immediately available for download, then parameter 208 should list the
upload directory in both the upload and download sections. Otherwise,
the download section should be blank to let all downloads go to the
FIDX.
Because the new FIDX file has longer records than RBBS-PC's original
version, errors will occur if this patch has not been installed. Run
the new RBBS-PC and verify that it can successfully locate files by
V)iewing or D)ownloading a file from one of your download areas. Files
located in your upload area, or in a directory listed in the download
areas specified in CONFIG parameter 208 will not test the new
modifications. You also may wish to attempt to upload a file that is
already on your system to be sure that it is recognized as a duplicate.
Enabling FMS Directory Maintenance
Now that the basics are in place, the rest of the work can be done
at your lieisure. To turn on FMS directory maintenance, the only
required parameter for your RFM.DEF file is FMSFILE. I strongly
recommend, that the first time you run RFM with FMS directory
maintenance installed, that you at least include an FMSMISSING entry to
be sure you don't delete directory entries for a download path that you
3
RBBS-PC Automatic File Area Maintenance (RFM)
may have missed during the initial installation. All the parameters
that start with the letters FMS apply to FMS directory maintenance.
You should review each of these to decide if you wish to use them.
Enabling Automatic File Movement
You can enable the automatic migration of files from upload areas to
download areas by including the <days> and <path> options on your UPLOAD
option in RFM.DEF. Archiving is enabled by including these same options
on the FILESPEC and FILEDIR lines. For archiving, the BULLETIN option
can be used to warn users of files that will soon be archived. The
FMSARCHIVE option determines how archived files will be treated when
you use the FMS directory maintenance options.
The Parameters
BULLETIN
The Bulletin parameter names a file into which the directory
entries for "dusty" files will be written. Following the file
name, also add a <days> parameter. The <days> will specify the
number of days BEFORE the file is archived that you wish to list
it in the bulletin. This parameter is active ONLY if the FMS
file comparison is enabled by using the FMSFile parameter.
Directory lines written to the bulletin file will be appended to
the end of the existing file. This allows you to use your own
text file as a header for the bulletin.
FILEDIR
This specifies a file containing a list of files that are
available for download. It may be formatted either as a normal
RBBS-PC directory (either old style or FMS), or as the output
from a DOS "DIR" command. In either case, it must contain a
line with the text "Directory of" followed by a path sepecifi-
cation or macro description. The file may contain multiple
"Directory of" lines, which means that you can concatenate any
number of file directories together. RFM will not validate the
path specified in these files. The file size and date must be
included in the directory list.
Recommendation: By specifying a macro in the "Directory of"
line, you can let callers search file directories from other
local BBSs and tell the user who to call to find the file.
FILESPEC
The FileSpec parameters define your downloadable file areas. If
only a path is given, then all files in that path are assumed to
4
RBBS-PC Automatic File Area Maintenance (RFM)
be available for download. Alternately, a wildcard file
specification or specific file name may be given. Adding "/S"
after the pathname causes all unhidden subdirectories to be
searched for the same file specification. Hidden and system
files will always be skipped. Following the path name, you may
optionally include <days> and <path> that are described below.
If these parameters are used, files that have not been
referenced by callers (viewed, downloaded, or attempted uploads)
within the number of days specified will be moved to the <path>.
See the BULLETIN and FMSARCHIVE parameters for more information.
Recommendation: If disk space is tight, use the <days> and
<path> option to move "dusty" files to another directory on your
hard disk. You can then back these files up to diskette and
recover the disk space that they used. Combined with the
FMSArchive and FileDir options, you can use a macro to tell
you when users try to download archived files so that you can
restore them to your download directory.
FMSCAT
FMSCat provides the default FMS category code to be assigned to
all FMS directory entries that are created by RFM when it finds
files on your system that are not listed in the FMS directory.
The default value is "UNC."
FMSALPHA
FMSAlpha provides the name of a file that RFM will build that is
to contain an alphabetic FMS directory. This file can then be
used to provide alphabetic master file lists for your users to
download. If your primary FMS directory is in alphabetic
sequence, then this parameter will be ignored. By default, no
alphabetic directory is created. Comment entries (starting with
an asterisk) will be placed at the top of this file.
FMSARCHIVE
FMSArchive controls how FMS directory entries will be treated
when the file is moved from the download area to an archive area
AND the archive area is not listed as a downloadable area. By
default, the directory entries will be deleted. The same three
options described for FMSMissing are available for FMSArchive.
Recommendation: You may want to use the file name option here.
Remember that RBBS-PC can execute a macro when a file is
selected whose directory path starts with "M!". By appending
the archived directory entries to a text file that is listed in
a FILEDIR parameter, you can use a macro that will list user
requests for archived files.
5
RBBS-PC Automatic File Area Maintenance (RFM)
FMSDATE
This parameter controls what file date will be used in the FMS
directory. By default, the newer of the actual file date or the
date in the old FMS directory will be used. You may give any of
three values here:
FMSDATE ACTUAL - to use the actual file date
FMSDATE FMS - to use the date in the old FMS directory
FMSDATE NEWER - to use the more recent of the two (default)
Any of the three values may be abbrevieated with just the first
character (A, F, or N).
FMSDESCLEN
FMSDescLen specifies what description length should be used for
the new FMS directory. RFM will automatically check the length
of the first line of the FMS directory and use the same descrip-
tion length that it finds in the old directory. If you want to
change your description length, or need to reformat a bad
directory, specify the desired description length here.
FMSFILE
FMSFile is the name of the FMS directory that is to be compared
with the download areas and rebuilt. By default, no FMS file
comparison is made. RFM will detect the NOSORT option in the
first line of an alphabetically sequenced FMS directory and
automatically build the same sequence for its output. If the
NOSORT option is not listed, the new FMS directory will be in
date sequence. Date sequenced directories also will be sorted
so that files will be listed to the user alphabetically within
date. To use this option, you MUST have a single FMS directory,
or at least separate download directories that correspond to
each separate FMS directory. Chained FMS directories are
supported.
FMSMISSIMG
FMSMissing controls how FMS directory entries will be treated
when the file cannot be found in any of the specified
directories. By default, these FMS directory entries will be
deleted. You can specify any of three options here:
Use just a period (.) to make RFM keep the directory entry
as it is.
Give a file name to make RFM write missing directory entries
to a separate file. Entries are appended to the existing
file in standard FMS format.
6
RBBS-PC Automatic File Area Maintenance (RFM)
Provide a one word test (like "missing") to make RFM replace
the file size in the directory entry with this text. The
text is limited to no more than 8 characters.
Recommendation: When you first try RFM, you may want to set
this to "missing" or "deleted". Later, you may want to
change this to delete the directory entry.
LOCATIONFILE
LocationFile is the name of the list of paths that the file
index references and must also match the RBBS-PC configuration.
The default value is LIDX.DEF in the current directory.
NAMEFILE
NameFile is the name of the file index that RBBS-PC will look
for. The default value is FIDX.DEF in the current directory.
UPLOAD
The Upload parameters define your upload file directories. The
Upload parameters are identical to the FileSpec parameters and
work the same way except the way the <days> and <archive
path> are used. If the path(s) you list here are
listed as available for download in your RBBS-PC configuration,
then the date recorded in the file index will remain as the date
the file was first discovered on your system by RFM. If the
<days> and <archive path> are given for Upload areas, then the
uploaded files will be moved to the <archive path> after they
have been on your system for <days> number of days.
WORKPATH
The WorkPath parameter specifies a directory that RFM should use
for all of its working files. Since temporary files have to be
built for the new file index and the extracted FMS directory,
and these working files have to be sorted, and the new FMS
directory sorted again, the use of a RAM disk for working files
can significantly speed things up.
<days>
The <days> option may be added to FileSpec or Upload to tell RFM
how old a file should be before it is moved. It is given as a
simple decimal number. Use -1 to ALWAYS move a file (this can
be useful for upload areas if you don't want to examine these
files) or 0 to NEVER move a file (this is useful to temporarily
"turn off" a file move). <days> can be used on the Bulletin
parameter to indicate how many days BEFORE a file is archived
that its directory entry should be listed in the bulletin.
7
RBBS-PC Automatic File Area Maintenance (RFM)
<path>
The <path> option is added to FileSpec or Upload when you use
<days> to tell RFM where to move the file.
The Date Codes
The following table shows the codes used in the FIDX file to encode the
date the file was last referenced. The date appears as three ASCII
characters corresponding to year, month and day.
Decimal Character Year Month Day
32 <space> 80 1 1
33 ! 81 2 2
34 " 82 3 3
35 # 83 4 4
36 $ 84 5 5
37 % 85 6 6
38 & 86 7 7
39 ' 87 8 8
40 ( 88 9 9
41 ) 89 10 10
42 * 90 11 11
43 + 91 12 12
44 , 92 13
45 - 93 14
46 . 94 15
47 / 95 16
48 0 96 17
49 1 97 18
50 2 98 19
51 3 99 20
52 4 00 21
53 5 01 22
54 6 . 23
55 7 . 24
56 8 . 25
57 9 26
58 : 27
59 ; 28
60 < 29
61 = 30
62 > 31
Footnote
RFM may be freely used and distributed. Questions and comments are
welcome. I hope you will find RFM as valuable to your system as I do
to mine.
8